import json

with open("brandable_variables.json") as f:
    brandable = json.load(f)

for b in brandable:
    for v in b["variables"]:
        vn = v["variable_name"]
        vd = v["default"]

        if v["type"] == "color" and v["default"] != "none":
            print("${}: {};".format(vn, vd))
            print("${}-darkened-5: darken({}, 5);".format(vn, vd))
            print("${}-darkened-10: darken({}, 10);".format(vn, vd))
            print("${}-darkened-15: darken({}, 15);".format(vn, vd))
            print("${}-lightened-5: lighten({}, 5);".format(vn, vd))
            print("${}-lightened-10: lighten({}, 10);".format(vn, vd))
            print("${}-lightened-15: lighten({}, 15);".format(vn, vd))
            print("${}-lightened-30: lighten({}, 30);".format(vn, vd))
        elif v["type"] == "percentage":
            print("${}: {};".format(vn, vd))
        elif v["type"] == "image":
            if vd:
                print("${}: url({});".format(vn, vd))
            else:
                print("${}: none;".format(vn, vd))
